def renderAll():
	for o in bpy.data.objects:
		if o.animation_data:
			selected = o
			break
	try:
		path = bpy.data.scenes[0].render.filepath
		if path.find("tiles") > 0:
			bpy.data.scenes[0].render.resolution_x = 50
			bpy.data.scenes[0].render.resolution_y = 50
			bpy.data.scenes[0].render.resolution_percentage = 100

		for c in bpy.data.cameras:
			bpy.context.scene.camera = find(c)
			cname = bpy.context.scene.camera.name
			bpy.data.scenes[0].render.filepath = path + "_" + c.name
			bpy.context.scene.frame_current = 0
			bpy.ops.render.render(write_still=True)
			if o:
				for a in bpy.data.actions:
					bpy.data.scenes[0].render.filepath = path + "_" + c.name + "_" + a.name + "\\"
					if o.animation_data:
						o.animation_data.action = a
						bpy.ops.render.render(animation=True)
					else:
						bpy.ops.render.render(write_still=True)

			bpy.data.scenes[0].render.filepath = path
	except:
		bpy.data.scenes[0].render.filepath = path
		raise
